{#include file="top.php"#}
<script type="text/javascript">
    function sidebar_newreport(uid,page){
        $.getJSON("/block.php?action=b16_1",{uid:uid,page:page},function(data){
           $('#sidebar_person_newreport').html(data.report);
        });
    }

    function ajax_share_report_ponits(id,action_name,remark){
        $.ajax({
            url : '/ajax_points.php?action=ajax_fb_points',
            type : 'POST',
            data: "id="+id+"&code={#php#}echo md5('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'imoreHK');{#/php#}&action_name="+action_name+"&remark="+remark,
            dataType : 'json',
            success: function(data){
                if(data.ret==0){
                    // console.info("未登入");
                }else if(data.ret==1){
                    if(data.data.ret==1){
                        // console.info(data.data.action);
                    }else{
                        //  console.info(data.data.reason);
                    }

                }else{
                    // console.info(data.reason);
                }
            }
        });

        var fb_count = 0;
        fb_count = parseInt($('#fb_count_'+id).html())+1;
        $('#fb_count_'+id).html(fb_count);

    }

    function showpop(text){
        $("#fullbg").fadeIn();
        $("#dialog1").fadeOut('slow');
        $("#dialog").fadeOut('slow');
        showLB('#dialog_popup',0);
        $("#popupText").text(text);
    }
    function closeLB(){
        $("#fullbg").fadeOut('slow');
        $("#dialog").fadeOut('slow');
        $("#dialog_popup").fadeOut('slow');
    }

        function showre(id,s,p){
        var c = $('#remsg'+id).attr('c');
        if(c==1){
            $('#remsg'+id).attr('c',0);
            //$("#remsglist"+id).empty();
            hidere(id);
        }else{
            $('#remsg'+id).attr('c',1);
            $('#remsg'+id).show();
            if(s>0){
                var d = $('#remsg'+id).attr('d');
                if(d==0){
                    $('#remsg'+id).attr('d',1);
                    addmsg(id,p);
                }
            }
        }
        show_my_pic();
    }

    function hidere(id){
        $('#remsg'+id).hide();
    }

    function addmsg(id,p){
        $.getJSON("/product.php?action=ajax&t=1",{topid:id,page:p},function(data){
            $.each(data.result,function(idx,item){
                var htm = "";
                if(item.mid=={#$uid#} || (1=={#$reply_type#} && item.top_mid=={#$uid#})){
                    htm ='<span id="remove'+item.id+'"><span id="rev1_'+item.id+'"><a href="javascript:void(0);" onclick="removemsg('+item.id+','+item.topid+',0)" class="btn_s btn_s_remove"><strong>移除</strong></a></span></span>';
                }else{
                    htm='<a href="javascript:void(0);" onclick="inform('+item.id+','+item.id+')" class="btn_s btn_s_rep"><strong>舉報</strong></a>';
                }
                $("#remsglist"+id).prepend('<div id="msglistbody2_'+item.id+'" class="s_m_box"><figure class="img_box"><img src="'+item.photo_l+'" width=56 /></figure><div class="good"><a href="javascript:void(0);"  onclick="plikes2(\'comment\','+item.id+',1)" class="g1"><span id="msglikes'+item.id+'_1">'+item.likes+'</span></a><a href="javascript:void(0);"  onclick="plikes2(\'comment\','+item.id+',2)" class="g2"><span id="msglikes'+item.id+'_2">'+item.unlikes+'</span></a></div><strong class="name">'+item.username+'</strong><span>'+item.addtime+'</span>'+htm+'<p id="msgtxt'+item.id+'" e=0>'+item.body+'</p></div>');
                //$('#coun1').html(parseInt($('#coun1').attr('comments'))+1 + '則留言').attr('comments', parseInt($('#coun1').attr('comments'))+1);
            });
            if((data.pageinfo.pagecount-data.pageinfo.curpage)>0){
                $("#more"+id).html('<a href="javascript:void(0);" onclick="addmsg('+id+','+(p+1)+')">更多</a>');
            }
            if((data.pageinfo.pagecount-data.pageinfo.curpage)==0){
                $("#more"+id).empty();
            }
        });
    }

    function callback(content){
        switch(content['retcode']){
            case 1:
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();')");
                showLB('#dialog',0);
                break;
            case 2:
                //alert(content['msg']);
                $('#remsg'+content['data'].topid).attr('d',1);
                $("#message2_"+content['data'].topid).val('');
                $("#remsglist"+content['data'].topid).append('<div id="msglistbody2_'+content['data'].id+'" class="s_m_box"><figure class="img_box"><img src="'+content['data'].photo_l+'" width=56 /></figure><div class="good"><a href="javascript:void(0);"  onclick="plikes2(\'comment\','+content['data'].id+',1)" class="g1"><span id="msglikes'+content['data'].id+'_1">'+content['data'].likes+'</span></a><a href="javascript:void(0);"  onclick="plikes2(\'comment\','+content['data'].id+',2)" class="g2"><span id="msglikes'+content['data'].id+'_2">'+content['data'].unlikes+'</span></a></div><strong class="name">'+content['data'].username+'</strong><span>'+content['data'].addtime+'</span><span id="remove'+content['data'].id+'"><span id="rev1_'+content['data'].id+'"><a href="javascript:void(0);" onclick="removemsg('+content['data'].id+','+content['data'].topid+',0)" class="btn_s btn_s_remove"><strong>移除</strong></a></span></span><p id="msgtxt'+content['data'].id+'" e=0>'+content['data'].body+'</p></div>');


                $('#coun2_'+content['data'].topid).html('<a  href="javascript:void(0);" onclick="showre('+content['data'].topid+','+content['data'].sum+',1)" class="btn_s btn_s_reply"><strong>'+content['data'].sum+'回覆</strong></a>');
                $('#sum'+content['data'].topid).val(parseInt($('#sum'+content['data'].topid).val())+1);
                break;
            case 3:
                //alert(content['msg']);
                $("#msgbody").show();
                $("#message1").val('');
                $('#coun1').html(parseInt($('#coun1').attr('comments'))+1 + '則留言').attr('comments', parseInt($('#coun1').attr('comments'))+1);
                $("#msgcontent").prepend('<div class="s_m_box"  id="msglistbody1_'+content['data'].id+'"><figure class="img_box"><img src="'+content['data'].photo_l+'" width=56 /></figure><div class="good"><a href="javascript:void(0);"  class="g1" onclick="plikes2(\'comment\','+content['data'].id+',1)" id="msglikes'+content['data'].id+'_1">'+content['data'].likes+'</a><a href="javascript:void(0);"  class="g2" onclick="plikes2(\'comment\','+content['data'].id+',2)" id="msglikes'+content['data'].id+'_2">'+content['data'].unlikes+'</a></div><strong class="name">'+content['data'].username+'</strong><span>'+content['data'].addtime+'</span><span id="remove'+content['data'].id+'"><span id="rev1_'+content['data'].id+'"><a href="javascript:void(0);" onclick="removemsg('+content['data'].id+','+content['data'].topid+',1)" class="btn_s btn_s_remove"><strong>移除</strong></a></span></span><p id="msgtxt'+content['data'].id+'">'+content['data'].body+'</p><span  id="coun2_'+content['data'].id+'"><a id="coun2_'+content['data'].id+'" href="javascript:void(0);" onclick="showre('+content['data'].id+','+content['data'].sum+',1)" class="btn_s btn_s_reply"><strong>'+content['data'].sum+'回覆</strong></a></span><div id="remsg'+content['data'].id+'" style="display:none" c=0 d=0><div id="remsglist'+content['data'].id+'"></div><div id="more'+content['data'].id+'"></div><form id="form'+content['data'].id+'" name="form'+content['data'].id+'" action="/product.php?action=ajax&t=2" method="post" target="iframe1"><input type="hidden" name="rid" value="'+content['data'].oid+'"/><input type="hidden" name="linkid" value="'+content['data'].id+'"/><input type="hidden" id="sum'+content['data'].id+'" name="sum" value="'+content['data'].sum+'"/><div class="s_m_box s_m_box_ta"><figure class="img_box"><img src="{#$photo#}" e=1 width=56 /></figure><div class="ta"><textarea id="message2_'+content['data'].id+'" name="message"></textarea></div><a href="javascript:void(0);" onclick="form'+content['data'].id+'.submit();" class="btn_s btn_s_cri"><strong>評論</strong></a></div></form></div></div>');

                break;
            default:
                break;
            }
        }

        function isremove(id,is){
            if(is==0){
                $("#rev1_"+id).hide();
                $("#rev2_"+id).show();
            }else{
                $("#rev1_"+id).show();
                $("#rev2_"+id).hide();
            }
        }

        function removemsg(id,topid,is){
            var sum = parseInt($('#sum'+topid).val());
            $.post("/product.php?action=ajax&t=5",{id:id,topid:topid,sum:sum,is:is},function(data){
                //alert(data+'|'+is);
                if(data){
                    if(is){
                        $("#msglistbody1_"+id).remove();

                        $('#coun1').html(parseInt($('#coun1').attr('comments'))-1 + '則留言').attr('comments', parseInt($('#coun1').attr('comments'))-1);
                    }else{
                        $("#msglistbody2_"+id).remove();
                        $('#coun2_'+topid).html('<a  href="javascript:void(0);" onclick="showre('+topid+','+(parseInt($('#sum'+topid).val())-1)+',1)" class="btn_s btn_s_reply"><strong>'+(parseInt($('#sum'+topid).val())-1)+'回覆</strong></a>');
                        $('#sum'+topid).val(parseInt($('#sum'+topid).val())-1);
                    }
                }
            });
        }

    function plikes(sec,sid){
        $.getJSON("/product.php?action=ajax&t=3",{sec:sec,sid:sid},function(data){
            if(parseInt(data.recode)==1){
                $('#'+sec+'_likes_'+sid).html(data.likes);
            }else if(parseInt(data.recode)==2){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();plikes(\\'"+sec+"\\',"+sid+")')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();plikes(\\'"+sec+"\\',"+sid+")')");
                showLB('#dialog',0);
            }else{
                showpop(data.msg);
            }
        });
    }

    function plikes2(sec,sid,type){
        $.getJSON("/product.php?action=ajax&t=3",{sec:sec,sid:sid,type:type},function(data){
            if(parseInt(data.recode)==1){
                $('#msglikes'+sid+'_'+type).html(data.likes);
            }else if(parseInt(data.recode)==2){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();plikes2(\\'"+sec+"\\',"+sid+","+type+")')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();plikes2(\\'"+sec+"\\',"+sid+","+type+")')");
                showLB('#dialog',0);
            }else{
                showpop(data.msg);
            }
        });
    }

    function inform(id,mid){
        $.getJSON("/product.php?action=ajax&t=4",{id:id,mid:mid},function(data){
            if(parseInt(data.recode)==1){
                $("#msgtxt"+id).prepend("<p class='warn'>感謝你向 iMORE 舉報不當行為！</p>");
            }else if(parseInt(data.recode)==0){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();inform("+id+","+mid+")')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();inform("+id+","+mid+")')");
                showLB('#dialog',0);
            }else{
                showpop(data.msg);
            }
        });
    }

    function fb_recommend(sec,sid){
        $.getJSON("/product.php?action=ajax&t=12",{sec:sec,sid:sid},function(data){
            if(parseInt(data.recode)==1){
                $('#fb_recommend').html(data.likes);
            }else if(parseInt(data.recode)==2){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('fb_recommend(\\'"+sec+"\\',"+sid+")')");
                $("#login_type").attr("onClick","fnblogin('fb_recommend(\\'"+sec+"\\',"+sid+")')");
                showLB('#dialog',0);
            }else{
                showpop(data.msg);
            }
        });
    }


    function login(func){

        var email = $('#email').val();
        if($.trim(email).length==0){
            showpop("{#$NO_USERNAME#}");
            $('#email').focus();
            return false;
        }
        var password = $('#password').val();
        if($.trim(password).length==0){
            showpop("{#$NO_PASSWORD#}");
            $('#password').focus();
            return false;
        }
        $.getJSON("/member.php?action=ajax_login_imore",{email:email,password:password/*,captcha:captcha*/},function(data){
            if(parseInt(data.ret)==1){
                showpop(data.msg);
            }else if(parseInt(data.ret)==2){
                showpop(data.msg);
                $('#captcha').attr("src","captcha.php?t="+Math.random());
            }else{closeLB();memberBar();eval(func);}
        });
    }

    function login_fnb(func){
        var email = $('#email').val();
        if($.trim(email).length==0){
            showpop("{#$NO_USERNAME#}");
            $('#email').focus();
            return false;
        }
        var password = $('#password').val();
        if($.trim(password).length==0){
            showpop("{#$NO_PASSWORD#}");
            $('#password').focus();
            return false;
        }
        $.getJSON("/member.php?action=ajax_login_fnb",{email:email,password:password/*,captcha:captcha*/},function(data){
            if(parseInt(data.ret)==1){
                showpop(data.msg);
            }else if(parseInt(data.ret)==2){
                showpop(data.msg);
                $('#captcha').attr("src","captcha.php?t="+Math.random());
            }else{closeLB();memberBar();eval(func);}
        });
    }

    function fnblogin(func){
        $("#loginText").text("F&amp;B 會員登入 REGISTRATION");
        $("#login").attr("onClick","login_fnb("+func+")");
        $("#login_type_text").text("以 iMORE 登入");
        $("#login_type").attr("onClick","itriallogin("+func+")");
        $("#loginTextName").css("background-position","0 -940px");
        $("#classlogo").attr("class","itrial ir");

    }
    function itriallogin(func){
        $("#loginText").text("iTRIAL 會員登入 REGISTRATION");
        $("#login").attr("onClick","login("+func+")");
        $("#login_type_text").text("以 F&B 登入");
        $("#login_type").attr("onClick","fnblogin("+func+")");
        $("#loginTextName").css("background-position","0 -900px");
        $("#classlogo").attr("class","fabtn ir");

    }

    function showLB(ct,n){
        var sh=$(document).height();
        var sw=$(document).width();
        var st=$(window).scrollTop();
        var ch=$(window).height();
        var cw=$(window).width();
        var tbT=(Number(ch)/3+Number(st))+"px";
        var tbL=(Number(cw)/2)+"px";
        if(n==0){
            $("#fullbg").css({width:sw,height:sh});
            $(ct).css({top:tbT,left:tbL});
            $("#fullbg").fadeTo('slow', 0.4);
            $(ct).fadeIn('slow');
            $(window).scroll(function(){showLB(ct,1)});
            $(window).resize(function(){showLB(ct,1)});
        }else{
            if($("#fullbg").css("display")=="block"){
                $("#fullbg").css({width:sw,height:sh});
                $(ct).css({top:tbT,left:tbL});
            }
        }
    }

    function user_like(uid){
        $.getJSON("/person.php?action=ajax&t=1",{uid:uid},function(data){
            if(parseInt(data.recode)==2){
                $('#like_bt').html("<a href='javascript:void(0);' class='btn_grey' onclick='user_unlike("+uid+")'>取消關注</a>");
                $('#user_likes').text(parseInt($('#user_likes').text()) + 1);
            }else if(parseInt(data.recode)==1){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();user_like("+uid+")')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();user_like("+uid+")')");
                showLB('#dialog',0);
            }else{
                showpop(data.msg);
            }
        });
    }

    function user_unlike(uid){
        $.getJSON("/person.php?action=ajax&t=2",{uid:uid},function(data){
            if(parseInt(data.recode)==2){
                $('#like_bt').html("<a href='javascript:void(0);' class='btn_pink' onclick='user_like("+uid+")'>關注</a>");
                $('#user_likes').text(parseInt($('#user_likes').text()) - 1);
            }else if(parseInt(data.recode)==1){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();user_unlike("+uid+")')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();user_unlike("+uid+")')");
                showLB('#dialog',0);
            }else{
                showpop(data.msg);
            }
        });
    }


    function check_login(){
        $.get("/product.php?action=ajax&t=15",function(data){
            if(parseInt(data)==1){
                $("#loginText").text("以iMORE帳戶登入");
                $("#login").attr("onClick","login('show_my_pic();')");
                $("#login_type").attr("onClick","fnblogin('show_my_pic();')");
                showLB('#dialog',0);
            }
        });
    }
    function show_my_pic(){
        $.get("/product.php?action=ajax&t=14",function(data){
            $('[e=1]').attr('src',data);
        });
    }

    $(function() {
        $('.img_lightbox').lightBox();
    });
</script>


<div class="body">
    <div class="main">
        <div class="u_box_top">
            <figure class="img_box">
                <img src="{#$user.photo_l#}" width=77  />
            </figure>
            <strong class="name">{#$user.username#}</strong>
            <span class="btn_bk"><span id='user_likes'>{#$user.likes#}</span> Fans</span>
            {#if $uid neq $mid#}
            <span id='like_bt'>
                {#if $user.islike==0#}
                <a href="javascript:void(0);" class="btn_pink" onclick='user_like({#$user.id#})'>關注</a>
                {#else#}
                <a  href="javascript:void(0);" class="btn_grey" onclick='user_unlike({#$user.id#})'>取消關注</a>
                {#/if#}
            </span>
            {#/if#}
            <p>年齡 / {#$user.age#}</p>
            <p>臉部膚質 / {#$user.body_skin#}</p>
            <p>iTrial 分 / {#$user.points#}<a href="{#optimize_url('help', 'show','page=4')#}" target="_blank"><i class="icon point"></i></a></p>
        </div>
        <div class="tab_b_box tab_b_box_r">
            <a href="{#optimize_url('person', 'report','username='|cat:$user.username)#}" class="curr">報告 / Blog</a>
            <a href="{#optimize_url('person', 'attention','ps=3&username='|cat:$user.username)#}">關注會員</a>
            <a href="{#optimize_url('person', 'recommen','username='|cat:$user.username)#}">推介報告</a>
            <em class="line"></em>
        </div>

        <div class="b_box b_box_pro_rep">
            <div class="bd">
                <div class="box_mid">
                    {#if !empty($user_reports.report.well)#}<p>總評：{#if $user_reports.report.well==1#}很好{#else if $user_reports.report.well==2#}好{#else if $user_reports.report.well==3#}一般{#else if $user_reports.report.well==4#}差{#else if $user_reports.report.well==5#}很差{#/if#}</p>{#/if#}
                    <div class="star_box">
                        {#if $user_reports.report.category#}
                        <table>
                            <tbody><tr>
                                    {#foreach  from=$user_reports.report.category item=v1 key=k1#}
                                    <th>{#$v1.name#}</th>
                                    <td><strong class="star star_{#$v1.value#}">{#$v1.value#}星</strong></td>
                                    {#if (($k1+1)%3) eq 0#}</tr><tr>{#/if#}
                                    {#/foreach#}
                                </tr>
                            </tbody>
                        </table>
                        {#/if#}
                         {#if $pre neq 1#}
                        <div class="btn_box_r">
                            <a href="javascript:void(0);" onclick="plikes('report',{#$user_reports.report.id#})" class="btn_pink">推介</a>
                            <!--<a href="http://www.facebook.com/sharer.php?u={#$thisUrl#}&t={#$user_reports.report.title#}-{#$user_reports.product.cname#}" class="btn_fb_share" target=_blank>facebook share</a>-->
                            <span><a id='report_likes_{#$user_reports.report.id#}'>{#$user_reports.report.likes#}</a>個推介</span>
                            <div class="facebook_share">
                                <div class="count"><span class="count_button_nub">
                                    </span> <div  id="fb_count_{#$user_reports.report.id#}">{#$user_reports.report.fb_count#}</div></div>
                                <script>
                                    function postToFeed{#$user_reports.report.id#}(id) {
                                        // calling the API ...
                                        var obj = {
                                            method: 'feed',
                                            link: '{#php#}echo DOMAIN;{#/php#}{#substr($user_reports.report.share_url,1)#}',
                                            picture: '{#php#}echo DOMAIN;{#/php#}{#$user_reports.product._photo_url#}',
                                            name: '{#str_replace("'","’",$user_reports.report.title)#}',
                                            caption: '{#str_replace("'","’",$user_reports.product.cname)#}',
                                            description: '{#str_replace("'","’",str_replace(array("\r\n", "\n", "\r"),"",strip_tags(htmlspecialchars_decode($user_reports.report.body))))#}'
                                        };
                                        FB.ui(obj, function(response){
                                            if(response['post_id']){
                                                var remark = "{#str_replace("'","’",$user_reports.report.title)#}"
                                                ajax_share_report_ponits(id,"share_report",remark);
                                            }
                                        });
                                    }</script>
                                <a class="btn_fb_share" title="Share on Facebook" onclick="postToFeed{#$user_reports.report.id#}({#$user_reports.report.id#});" href="javascript:void(0);"></a>

                            </div>
                        </div>
                         {#/if#}
                    </div>
                    <p class="que">{#$user_reports.report.title#}</p>
                </div>
                <div class="box_bot">
                    <style>.box_bot img{display: inline;max-width:450px;}</style>
                    {#$user_reports.report.body#}
                </div>
            </div>
        </div>
        {#if $pre neq 1#}
        <div id='messagebox' name='messagebox' class="t_msg_box">
            <div class="hd" id="coun1" comments="{#$user_reports.report.comments#}">
                {#if !empty($user_reports.report.comments)#}{#$user_reports.report.comments#}則{#/if#}留言
            </div>
            <div class="bd">
                <div class="s_m_box s_m_box_ta">
                    <form id="forms" name="forms" action="/product.php?action=ajax&t=2" method="post" target="iframe1">
                        <input type="hidden" name="rid" value="{#$user_reports.report.id#}"/>
                        <input type="hidden" name="linkid" value="0"/>
                        <figure class="img_box">
                            <img src="{#$photo#}" e=1 width=56/>
                        </figure>
                        <div class="ta">
                            <textarea id="message1" name="message" onfocus="check_login()"></textarea>
                        </div>
                        <a href="javascript:void(0);" class="btn_s btn_s_cri" onclick="forms.submit();">
                            <strong>我要留言</strong>
                        </a>
                    </form>
                </div>
                <div id="msgcontent">　
                    {#foreach from=$reportsCommentList.result item=v2 key=k2#}

                    <div class="s_m_box"  id="msglistbody1_{#$v2.id#}">
                        <figure class="img_box">
                            <img src="{#$v2.photo_l#}" width=56 />
                        </figure>
                        <div class="good">
                            <a href="javascript:void(0);"  class="g1" onclick="plikes2('comment',{#$v2.id#},1)" id="msglikes{#$v2.id#}_1">{#$v2.likes#}</a>
                            <a href="javascript:void(0);"  class="g2" onclick="plikes2('comment',{#$v2.id#},2)" id="msglikes{#$v2.id#}_2">{#$v2.unlikes#}</a>
                        </div>
                        <strong class="name">{#$v2.username#}</strong>
                        <span>{#$v2.addtime#}</span>
                        {#if $v2.mid==$uid#}
                        <span id="remove{#$v2.id#}"><span id="rev1_{#$v2.id#}">
                                <a href="javascript:void(0);" onclick="removemsg({#$v2.id#},{#$v2.topid#},1)" class="btn_s btn_s_remove"><strong>移除</strong></a>
                            </span></span>
                        {#else#}
                        <a href="javascript:void(0);" onclick="inform({#$v2.id#},{#$v2.mid#})" class="btn_s btn_s_rep">
                            <strong>舉報</strong>
                        </a>
                        {#/if#}
                        <p id="msgtxt{#$v2.id#}">{#nl2br($v2.body)#}</p>
                        <span  id="coun2_{#$v2.id#}">
                            <a id="coun2_{#$v2.id#}" href="javascript:void(0);" onclick="showre({#$v2.id#},{#$v2.subComments#},1)" class="btn_s btn_s_reply">
                                <strong>{#$v2.subComments#}回覆</strong>
                            </a>
                        </span>
                        <div id="remsg{#$v2.id#}" style="display:none" c=0 d=0>
                            <div id="remsglist{#$v2.id#}"></div><div id="more{#$v2.id#}"></div>
                            <form id="form{#$v2.id#}" name="form{#$v2.id#}" action="/product.php?action=ajax&t=2" method="post" target="iframe1">
                                <input type="hidden" name="rid" value="{#$rid#}"/>
                                <input type="hidden" name="linkid" value="{#$v2.id#}"/>
                                <input type="hidden" id="sum{#$v2.id#}" name="sum" value="{#$v2.subComments#}"/>
                                <div class="s_m_box s_m_box_ta">
                                    <figure class="img_box">
                                        <img src="{#$photo#}" e=1 width=56 />
                                    </figure>
                                    <div class="ta">
                                        <textarea id="message2_{#$v2.id#}" name="message" onfocus="check_login()"></textarea>
                                    </div>
                                    <a href="javascript:void(0);" onclick="form{#$v2.id#}.submit();" class="btn_s btn_s_cri">
                                        <strong>評論</strong>
                                    </a>
                                </div>
                            </form>
                        </div>
                    </div>
                    {#/foreach#}
                </div>
            </div><br/>
        </div>
        {#$pagelist#}
        {#/if#}
    </div>
    <!-- main-->
    <div class="sidebar">
        {#show_block('b2',1,'','sidebar_ad')#}
        {#show_block('b1',2,'','sidebar_function')#}
        {#show_block('b3',0,'','sidebar_search')#}
        {#show_block('b16',0,'','sidebar_newreport','&uid='|cat:$user.id)#}
        {#show_block('b13',0,'','sidebar_registation')#}
        {#show_block('b9',0,'','sidebar_tutorial b_box')#}
        {#show_block('b6',0,'','sidebar_facebook')#}
    </div>
    <!-- sidebar -->

</div><!--body-->
<!--  遮罩層  -->
<div id="fullbg" "></div>
<div  class="irpopbox popbox b_box" id="dialog" style="z-index: 60;	display:none;">
    <div class="hd">
        <h2 class="ir ht" id=loginTextName><span id=loginText>iTRIAL 會員登入 REGISTRATION</span></h2>
        <a class="popclose" style="cursor:pointer" onclick="closeLB();">close</a>
    </div>
    <div class="bd">
        <div class="lbox">
            <p>會員名稱 USERNAME</p>
            <input type="text" class="ipt" name="email" id="email">
            <p>密碼 PASSWORD</p>
            <input type="password" class="ipt" name="password" id="password">
            <a class="btn_s btn_s_login" onclick="login()" style="cursor:pointer" id="login"><strong>login</strong></a>
            <ul>
                <li><a href="/member.php?action=forgetPassword">忘記密碼</a></li>
                <li><a href="/member.php?action=reg&toURL={#$thisUrl#}">註冊新帳號</a></li>
            </ul>
        </div>
        <div class="rbox">
            <div class="lgbox"><em class="hack"></em>
                <a class="fbtn ir" href="/member.php?action=login_facebook&toURL={#$thisUrl#}"><strong>以facebook登入</strong></a><span><a class="fb_link" href="/member.php?action=login_facebook&toURL={#$thisUrl#}">以facebook登入</a></span>
            </div>
            <div class="lgbox lgbox2" onClick="fnblogin()" id=login_type style="cursor:pointer" ><em class="hack"></em>
                <a class="fabtn ir" id=classlogo><strong>以F&amp;B登入</strong></a><span id=login_type_text  >以F&amp;B登入</span>
            </div>
        </div>
    </div>
</div>
<div style="top:400px;z-index:60;display:none;" class="apopbox popbox b_box" id="dialog_popup">
    <div class="hd">
        <h2 class="ir ht"><span>提示信息 ALERT</span></h2>
        <a class="popclose" onclick="closeLB();" style="cursor:pointer">close</a>            </div>
    <div class="bd">
        <p id="popupText"></p>
        <a class="btn_b btn_s_im_back" href="javascript:void(0);" onclick="closeLB();"><strong>立即返回</strong></a>            </div>
</div>

<iframe id="iframe1" name="iframe1" style="display:none"></iframe>
{#include file="footer.php"#}